
use "replication.dta"

version 17


log using "Replication", replace

*table 1***

probit physint_imp physint_lag domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe  time_physint_imp_count time_physint_sq  time_physint_cub if all_conflict_exp==1, cluster(cowcode)

probit polpris_imp polpris_lag domestick1_lag domestick1_lag_two_yr  polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe  time_polpris_count time_polpris_sq time_polpris_cub if all_conflict_exp==1, cluster(cowcode)

probit tort_imp tort_lag domestick1_lag domestick1_lag_two_yr  polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe  time_tort_count time_tort_sq time_tort_cub if all_conflict_exp==1, cluster(cowcode)

probit kill_imp kill_lag domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe  time_kill_count time_kill_sq time_kill_cub if all_conflict_exp==1, cluster(cowcode)

probit disap_imp disap_lag  domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe  time_disap_count time_disap_sq time_disap_cub if all_conflict_exp==1, cluster(cowcode)



** table 2 in manuscript 
mvprobit (polpris_imp=polpris_lag domestick1_lag  polity2_lag ln_gdppc_lag ln_population_lag lji_lag high_conflict time_polpris_count time_polpris_sq time_polpris_cub)  (tort_imp=tort_lag domestick1_lag  polity2_lag ln_gdppc_lag ln_population_lag lji_lag time_tort_count time_tort_sq time_tort_cub high_conflict) (kill_imp=kill_lag domestick1_lag  polity2_lag ln_gdppc_lag ln_population_lag lji_lag time_kill_count time_kill_sq time_kill_cub high_conflict) (disap_imp=disap_lag  domestick1_lag polity2_lag ln_gdppc_lag ln_population_lag lji_lag time_disap_count time_disap_sq time_disap_cub high_conflict) (domestick1_lag=polity2_lag ln_gdppc_lag  lji_lag prev_conflict_intensity time_trial_count time_trial_sq time_trial_cub)  if all_conflict_exp==1, cluster(cowcode) dr(75)



mvprobit (polpris_imp=polpris_lag domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe time_polpris_count time_polpris_sq time_polpris_cub)  (tort_imp=tort_lag domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe time_tort_count time_tort_sq time_tort_cub) (kill_imp=kill_lag domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe time_kill_count time_kill_sq time_kill_cub) (disap_imp=disap_lag  domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe time_disap_count time_disap_sq time_disap_cub) (domestick1_lag=polity2_lag ln_gdppc_lag djamnestyk1_lag truthk1_lag lji_lag prev_conflict_intensity cat_rat ccpr_rat time_trial_count time_trial_sq time_trial_cub)  if all_conflict_exp==1, cluster(cowcode) dr(75)

***models with v-dem dvars*** - table A1 -

mvprobit (v2smarrest_ord_imp=v2smarrest_ord_lag domestick1_lag  polity2_lag ln_gdppc_lag ln_population_lag lji_lag high_conflict  )  (vdem_tort_imp=v2cltort_ord_lag domestick1_lag  polity2_lag ln_gdppc_lag ln_population_lag lji_lag high_conflict ) (v2clkill_ord_imp=v2clkill_ord_lag  domestick1_lag  polity2_lag ln_gdppc_lag ln_population_lag lji_lag high_conflict ) (domestick1_lag=polity2_lag ln_gdppc_lag lji_lag prev_conflict_intensity) if all_conflict_exp==1, cluster(cowcode) dr(31)

 

* model w/ just declines* - Table A2
 mvprobit (polpris_dec=polpris_lag domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe time_polpris_dec_count time_polpris_dec_sq time_polpris_dec_cub)  (tort_dec=tort_lag domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe time_tort_dec_count time_tort_dec_sq time_tort_dec_cub) (kill_dec=kill_lag domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe time_kill_dec_count time_kill_dec_sq time_kill_dec_cub) (disap_dec=disap_lag  domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe time_disap_dec_count time_disap_dec_sq time_disap_dec_cub) (domestick1_lag=polity2_lag ln_gdppc_lag djamnestyk1_lag truthk1_lag lji_lag prev_conflict_intensity cat_rat ccpr_rat time_trial_count time_trial_sq time_trial_cub)  if all_conflict_exp==1, cluster(cowcode) dr(75)



* loser-targeted-with trial - Table A3*

 mvprobit (polpris_imp=polpris_lag domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe  time_polpris_count time_polpris_sq time_polpris_cub)  (tort_imp=tort_lag domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe  time_tort_count time_tort_sq time_tort_cub) (kill_imp=kill_lag domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe  time_kill_count time_kill_sq time_kill_cub) (disap_imp=disap_lag  domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe  time_disap_count time_disap_sq time_disap_cub) (loser_both_targ_trial=polity2_lag ln_gdppc_lag djamnestyk1_lag truthk1_lag lji_lag prev_conflict_intensity cat_rat ccpr_rat time_targ_loser_both_count time_targ_loser_both_count_sq time_targ_loser_both_count_cub)  if all_conflict_exp==1, cluster(cowcode) dr(75)



*No domestic courts equation -  table A4 
mvprobit (polpris_imp=polpris_lag domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe time_polpris_count time_polpris_sq time_polpris_cub)  (tort_imp=tort_lag domestick1_lag domestick1_lag_two_yr  polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe  time_tort_count time_tort_sq time_tort_cub) (kill_imp=kill_lag domestick1_lag  domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe  time_kill_count time_kill_sq time_kill_cub) (disap_imp=disap_lag  domestick1_lag  domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe  time_disap_count time_disap_sq time_disap_cub)  if all_conflict_exp==1, cluster(cowcode) dr(75)


*single equation models with counts of trials -Table A6*
probit physint_imp physint_lag domestick1_count_lag  polity2_lag ln_gdppc_lag ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe time_physint_imp_count time_physint_sq  time_physint_cub if all_conflict_exp==1, cluster(cowcode)

probit polpris_imp polpris_lag domestick1_count_lag   polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe  time_polpris_count time_polpris_sq time_polpris_cub if all_conflict_exp==1, cluster(cowcode)

probit tort_imp tort_lag domestick1_count_lag  polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe  time_tort_count time_tort_sq time_tort_cub if all_conflict_exp==1, cluster(cowcode)

probit kill_imp kill_lag domestick1_count_lag   polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe  time_kill_count time_kill_sq time_kill_cub if all_conflict_exp==1, cluster(cowcode)

probit disap_imp disap_lag  domestick1_count_lag  polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe  time_disap_count time_disap_sq time_disap_cub if all_conflict_exp==1, cluster(cowcode)


***ordered probit models*** - Table A7 

*minimal*
oprobit polpris domestick1_lag  polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict polpris_lag tort kill disap  if all_conflict_exp==1, cluster(cowcode)
oprobit tort domestick1_lag  polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict  tort_lag polpris kill disap if all_conflict_exp==1, cluster(cowcode)
oprobit kill domestick1_lag    polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict  kill_lag tort polpris disap if all_conflict_exp==1, cluster(cowcode)
oprobit disap domestick1_lag  polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict disap_lag kill tort polpris  if all_conflict_exp==1, cluster(cowcode)
*expansive*
oprobit polpris domestick1_lag  domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe polpris_lag tort kill disap if all_conflict_exp==1, cluster(cowcode)
oprobit tort domestick1_lag domestick1_lag_two_yr   polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe tort_lag polpris kill disap if all_conflict_exp==1, cluster(cowcode)
oprobit kill domestick1_lag  domestick1_lag_two_yr  polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe kill_lag tort polpris disap if all_conflict_exp==1, cluster(cowcode)
oprobit disap domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag  cat_rat ccpr_rat africa asia europe disap_lag kill tort polpris  if all_conflict_exp==1, cluster(cowcode)


log close 

*Predicted Probabilities*\

 mvprobit (polpris_imp=polpris_lag domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe time_polpris_count time_polpris_sq time_polpris_cub)  (tort_imp=tort_lag domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe time_tort_count time_tort_sq time_tort_cub) (kill_imp=kill_lag domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe time_kill_count time_kill_sq time_kill_cub) (disap_imp=disap_lag  domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe time_disap_count time_disap_sq time_disap_cub) (domestick1_lag=polity2_lag ln_gdppc_lag djamnestyk1_lag truthk1_lag lji_lag prev_conflict_intensity cat_rat ccpr_rat time_trial_count time_trial_sq time_trial_cub)  if all_conflict_exp==1, cluster(cowcode) dr(75)

su domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe prev_conflict_intensity time_polpris_count time_polpris_sq time_polpris_cub time_tort_count time_tort_sq time_tort_cub time_kill_count time_kill_sq time_kill_cub time_disap_count time_disap_sq time_disap_cub time_trial_count time_trial_sq time_trial_cub polpris_lag tort_lag kill_lag disap_lag if e(sample)
clear
//pasted in values for domestik_lag from 0 to 1 (range of values for the variable); set other variables at means and modes//
set obs 1
generate var1 = 0 in 1
set obs 2
replace var1 = 1 in 2
rename var1 domestick1_lag
gen domestick1_lag_two_yr  = 0
gen polity2_lag=1.66
gen ln_gdppc_lag =7.28
gen ln_population_lag = 16.64 
gen lji_lag = .4
gen high_conflict = 0
gen djamnestyk1_lag =0
gen truthk1_lag = 0
gen cat_rat = 1
gen ccpr_rat = 1
gen africa = 1
gen asia = 0
gen europe = 0 
gen prev_conflict_intensity = 2
gen time_polpris_count = 5
gen time_polpris_sq = 25
gen time_polpris_cub = 125
gen time_tort_count = 6
gen time_tort_sq = 36
gen time_tort_cub = 216
gen time_kill_count =4
gen time_kill_sq = 16
gen time_kill_cub =64
gen time_disap_count = 7
gen time_disap_sq = 49
gen time_disap_cub =343
gen time_trial_count = 12
gen time_trial_sq =144
gen time_trial_cub = 1728
gen polpris_lag=.79
gen tort_lag = .46
gen kill_lag=.96
gen disap_lag=1.45


mvppred xb, xb  
mvppred stdp, stdp
summarize xb* stdp*


gen prediction_polpris=normal(xb1)
gen upper95_polpris=normal(xb1+(stdp1*1.66))
gen lower95_polpris=normal(xb1-(stdp1*1.66))

gen prediction_tort=normal(xb2)
gen upper95_tort=normal(xb2+(stdp2*1.66))
gen lower95_tort=normal(xb2-(stdp2*1.66))

gen prediction_kill=normal(xb3)
gen upper95_kill=normal(xb3+(stdp3*1.66))
gen lower95_kill=normal(xb3-(stdp3*1.66))

gen prediction_disap=normal(xb4)
gen upper95_disap=normal(xb4+(stdp4*1.66))
gen lower95_disap=normal(xb4-(stdp4*1.66))

save "outofsamplepredictiondata.dta", replace



*pared down out of sample predictions*

use "replication.dta"


mvprobit (polpris_imp=polpris_lag domestick1_lag  polity2_lag ln_gdppc_lag ln_population_lag lji_lag high_conflict time_polpris_count time_polpris_sq time_polpris_cub)  (tort_imp=tort_lag domestick1_lag  polity2_lag ln_gdppc_lag ln_population_lag lji_lag time_tort_count time_tort_sq time_tort_cub high_conflict) (kill_imp=kill_lag domestick1_lag  polity2_lag ln_gdppc_lag ln_population_lag lji_lag time_kill_count time_kill_sq time_kill_cub high_conflict) (disap_imp=disap_lag  domestick1_lag polity2_lag ln_gdppc_lag ln_population_lag lji_lag time_disap_count time_disap_sq time_disap_cub high_conflict) (domestick1_lag=polity2_lag ln_gdppc_lag  lji_lag prev_conflict_intensity time_trial_count time_trial_sq time_trial_cub)  if all_conflict_exp==1, cluster(cowcode) dr(75)

su domestick1_lag domestick1_lag_two_yr polity2_lag ln_gdppc_lag  ln_population_lag  lji_lag high_conflict djamnestyk1_lag truthk1_lag cat_rat ccpr_rat africa asia europe prev_conflict_intensity time_polpris_count time_polpris_sq time_polpris_cub time_tort_count time_tort_sq time_tort_cub time_kill_count time_kill_sq time_kill_cub time_disap_count time_disap_sq time_disap_cub time_trial_count time_trial_sq time_trial_cub polpris_lag tort_lag kill_lag disap_lag if e(sample)
clear
//pasted in values for domestik_lag from 0 to 1 (range of values for the variable); set other variables at means and modes//
set obs 1
generate var1 = 0 in 1
set obs 2
replace var1 = 1 in 2
rename var1 domestick1_lag
gen domestick1_lag_two_yr  = 0
gen polity2_lag=1.66
gen ln_gdppc_lag =7.28
gen ln_population_lag = 16.64 
gen lji_lag = .4
gen high_conflict = 0
gen djamnestyk1_lag =0
gen truthk1_lag = 0
gen cat_rat = 1
gen ccpr_rat = 1
gen africa = 1
gen asia = 0
gen europe = 0 
gen prev_conflict_intensity = 2
gen time_polpris_count = 5
gen time_polpris_sq = 25
gen time_polpris_cub = 125
gen time_tort_count = 6
gen time_tort_sq = 36
gen time_tort_cub = 216
gen time_kill_count =4
gen time_kill_sq = 16
gen time_kill_cub =64
gen time_disap_count = 7
gen time_disap_sq = 49
gen time_disap_cub =343
gen time_trial_count = 12
gen time_trial_sq =144
gen time_trial_cub = 1728
gen polpris_lag=.79
gen tort_lag = .46
gen kill_lag=.96
gen disap_lag=1.45


mvppred xb, xb  
mvppred stdp, stdp
summarize xb* stdp*


gen prediction_polpris=normal(xb1)
gen upper95_polpris=normal(xb1+(stdp1*1.66))
gen lower95_polpris=normal(xb1-(stdp1*1.66))

gen prediction_tort=normal(xb2)
gen upper95_tort=normal(xb2+(stdp2*1.66))
gen lower95_tort=normal(xb2-(stdp2*1.66))

gen prediction_kill=normal(xb3)
gen upper95_kill=normal(xb3+(stdp3*1.66))
gen lower95_kill=normal(xb3-(stdp3*1.66))

gen prediction_disap=normal(xb4)
gen upper95_disap=normal(xb4+(stdp4*1.66))
gen lower95_disap=normal(xb4-(stdp4*1.66))

save "outofsamplepredictiondata.pared.dta", replace





